﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data; 

namespace mpsalaryprojectgroup
{
    public partial class NEWContactUs : System.Web.UI.Page
    {
        String username = "";
        String loginName = "";
        protected void Page_Load(object sender, EventArgs e)
        {

            if (Session["Usename"] != null)
            {
                username = (string)(Session["Usename"]);
                if (username == null)
                {
                    Response.Redirect("NEWMainPage.aspx");
                }
                else
                {
                    lblUsername.Text = username;
                }
            }
            else if (Session["UsenameLogin"] != null)
            {
                loginName = (string)(Session["UsenameLogin"]);
                if (loginName == null)
                {
                    Response.Redirect("NEWMainPage.aspx");
                }
                else
                {
                    lblUsername.Text = loginName;
                }
            } 
           
              else
                {
                    Response.Redirect("NEWMainPage.aspx");
                }
            DisableBufferingOnPage();
        }
        protected void DisableBufferingOnPage()
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
            // set expiry date in the past
            Response.Expires = -1;
            Response.CacheControl = "no-cache";
            Response.Cache.SetNoStore();
            Response.AppendHeader("Pragma", "no-cache");
            Response.AppendHeader("Cache-Control", "no-cache");
            Response.CacheControl = "no-cache";
            Response.Expires = -1;
            Response.ExpiresAbsolute = new DateTime(1900, 1, 1);
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
        }



        protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("https://twitter.com/#!/PGSTeam");
        }

        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("http://www.facebook.com/pages/Polytechnic-Graduates-Salary-Portal/162065427243815?sk=wall");
        }
    }
}